package com.xiaok.smartclassroom.user.controller;

import com.xiaok.smartclassroom.user.common.req.UserLoginPasswordREQ;
import com.xiaok.smartclassroom.user.common.resq.UserLoginRESQ;
import com.xiaok.smartclassroom.user.service.UserLoginService;
import com.xiaok.smartclassroom.util.base.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Classname UserLoginController
 * @Description 后台用户接口
 * @Date 2021/3/24 21:44
 * @Created by xiaok
 */
@RestController
@RequestMapping(value = "/user/pc/api/user/login")
public class UserLoginController {

    @Autowired
    private UserLoginService userLoginService;

    @ApiOperation(value="用户密码接口",notes="用户密码登录")
    @PostMapping(value = "/password")
    public Result<UserLoginRESQ> loginByPassword(@RequestBody UserLoginPasswordREQ userLoginPasswordREQ){

        return userLoginService.loginByPassword(userLoginPasswordREQ);
    }

}
